#pragma warning disable 0618
using System;
using System.Collections.Generic;
using Table.DataModel;
namespace Table.Dao
{
    public class TableGuideExtraDao:DaoBase<TableGuideExtra>
    {
        public override string GetFileName()
        {
            return "TableGuideExtra.csv";
        }
        public override void BuildIndex()
        {
            if (cacheList != null)
            {
                cachePrimaryInt = new Dictionary<int, TableGuideExtra>(cacheList.Count);
            }
            base.BuildIndex();
        }
        public override void AddPrimaryIndex(TableGuideExtra model)
        {
            #if UNITY_EDITOR
            if(cachePrimaryInt.ContainsKey(model.guideId)) UnityEngine.Debug.LogError("数据表id重复:TableGuideExtra->id: " + model.guideId);
            #endif
            cachePrimaryInt[model.guideId] = model;
        }
        protected override TableGuideExtra ParseRowData(string[] rowData)
        {
            TableGuideExtra data = new TableGuideExtra();
            if (!string.IsNullOrEmpty(rowData[0]))
            {
                data.guideId = int.Parse(rowData[0]);
            }
            if (!string.IsNullOrEmpty(rowData[1]))
            {
                data.TriggerPrefabId = rowData[1];
            }
            return data;
        }
    }
}
